#include "conveyer.h"
#include "../CommandBase.h"
#include "../Commands/IRlocate.h"

Conveyer::Conveyer() : Subsystem("conveyer")
{	
	conveyerSpike1 = new Relay(CONVEYER1, Relay::kBothDirections);
	conveyerSpike2 = new Relay(CONVEYER2, Relay::kBothDirections);
}

void Conveyer::InitDefaultCommand()
{
	SetDefaultCommand(new IRlocate());
}

void Conveyer::Forward()
{
	conveyerSpike1->Set(Relay::kForward);
	conveyerSpike2->Set(Relay::kForward);
}

void Conveyer::Stop()
{
	conveyerSpike1->Set(Relay::kOff);
	conveyerSpike2->Set(Relay::kOff);
}

void Conveyer::Reverse()
{
	conveyerSpike1->Set(Relay::kReverse);
	conveyerSpike2->Set(Relay::kReverse);
}
